const routers = [
    {
        path: '*',
        meta: {
            title: '页面不存在',
        },
        component: (resolve) => require(['views/404'], resolve)
    },
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        meta: {
            title:'登录'
        },
        component: (resolve) => require(['views/login'], resolve)
    },
    {
        path: '/sys',
        redirect: '/sys/sysuser',
        component: resolve => require(['views/commons/layout.vue'], resolve),
        children: [{
            path: 'sysuser',
            meta: {
                title:'系统用户管理'
            },
            component: resolve => require(['views/sys/sysuser.vue'], resolve)
        },{
            path: 'sysrole',
            meta: {
                title:'系统角色管理'
            },
            component: resolve => require(['views/sys/sysrole.vue'], resolve)
        },{
            path: 'sysresource',
            meta: {
                title:'系统资源管理'
            },
            component: resolve => require(['views/coding.vue'], resolve)
        }]
    },
    {
        path: '/admin',
        redirect: '/admin/registuser',
        component: resolve => require(['views/commons/layout.vue'], resolve),
        children: [{
            path: 'registuser',
            meta: {
                title:'注册用户管理'
            },

            component: resolve => require(['views/modules/registuser.vue'], resolve)
        }]
    }
]
export default routers
